package Employer;

use warnings;
use strict;

require Person;
our @ISA = qw (Person);

# Constructor and initialisation
sub new
{
	my ( $class, $name, $address, $phone, $salary, $helper ) = @_;
	my $self = new Person( $name, $address, $phone );

	$self->{salary}   = $salary;
	$self->{helper} = $helper;

	bless( $self, $class );
	$self->init();

	return $self;
}

sub init
{
	my ($self) = @_;

	print "In class Employer\n";
}

# Object accessor methods

sub salary
{
	my ( $self, $salary ) = @_;
	$self->{salary} = $salary if defined $salary;
	return $self->{salary};
}

sub helper
{
	my ( $self, $helper ) = @_;
	$self->{helper} = $helper if defined $helper;
	return $self->{helper};
}

# Overriding Merthods

sub display
{
	my ($self) = @_;
	print "In Employer:display\n";
}

sub getAssistPerson
{
	my ($self) = @_;
	return $self->{helper};
}
1;
